{counter start=-1 skip=1 print=false}	
{section name=i loop=$listquestion}
	{$listquestion[i]->getText() assign='Question'}
	<b>{$Question}</b><br/>
	{if $listquestion[i]->getType() eq 0}
		{section name=j loop=$listquestion[i]->getAnswers()}
		{if $post.question[{$smarty.section.i.index}][{$smarty.section.j.index}]  == {$smarty.section.j.index}}
			Responded correctly to this question<br/>
			{counter print=false}
		{else}
		{$listquestion[i]->getAnswers() assign='Massreply'}
		 {$Massreply[j]->getText() assign='textOptionReply'}
				{if	$Massreply[j]->getIsCorrect() eq 1}	
					Correct answer: {$Massreply[j]->getText()}<br/>
					Your answer: {$Massreply[$post.question[{$smarty.section.i.index}][{$smarty.section.j.index}]]->getText()}<br/>
				{/if}
		{/if}
		{/section}					
	{else}
		 {assign var=trueReply value=array()}
		 {assign var=ReplyUser value=array()}
		{section name=j loop=$listquestion[i]->getAnswers()}
			{$listquestion[i]->getAnswers() assign='Massreply'}
			{if $Massreply[j]->getIsCorrect() eq 1} 
				{$trueReply[] = {$smarty.section.j.index}}
			{/if}
			{if $post.question[{$smarty.section.i.index}][{$smarty.section.j.index}] neq NULL}
			    {$ReplyUser[] = $post.question[{$smarty.section.i.index}][{$smarty.section.j.index}]}
			{/if}		
		{/section}		
		{if $trueReply eq $ReplyUser} 
			Responded correctly to this question<br/>
			{counter print=false}
		
		{else}
		Correct answer:<br/>
		{section name=j loop=$listquestion[i]->getAnswers()}
			{$listquestion[i]->getAnswers() assign='Massreply'}
 			{if $Massreply[j]->getIsCorrect() eq 1} 
 					{$Massreply[j]->getText()}<br/>
			{/if}
			{/section}
			Your answer:<br/>
			{section name=j loop=$ReplyUser}
				{$listquestion[i]->getAnswers() assign='Massreply'}
				{$Massreply[$ReplyUser[j]]->getText()}<br/>
			{/section}
		
		{/if}
		{/if}
{/section}
<h3>Your score: {counter} point</h3>